home *** CD-ROM | disk | FTP | other *** search
- Macintosh
- Sample Code Notes
- _____________________________________________________________________________
- Developer Technical Support
-
- #2: TESample
-
- Written by: Mark Bennett, Rick Blair, and Dave Radcliffe
-
- Versions: 1.00 August 1988
- 1.01 November 1988
- 1.02 April 1989
- 1.03 June 1989
- 1.04 June 1992
-
- Components: TESample.p June 1, 1989
- TESample.c June 1, 1989
- TESampleInit.c June 4, 1992
- TESampleGlue.a June 1, 1989
- TESample.r June 1, 1989
- TESample.h June 1, 1989
- PTESample.make June 1, 1989
- CTESample.make June 1, 1989
- TCTESample.π June 4, 1992
- TCTESample.π.rsrc June 4, 1992
- TCTESampleGlue.c June 4, 1992
-
- A/UX Components: Makefile June 1, 1989
- TESampleAUX.c June 1, 1989
- TESampleInitAUX.c June 1, 1989
- TESample.h June 1, 1989
- TESampleGlue.s June 1, 1989
- TESample.r June 1, 1989
-
- _____________________________________________________________________________
-
- Major changes with 1.01
- ________________________
-
- Revamped the way that memory availability is checked and handled
- at initialization. Substantially changed the way windows are
- closed. Added an error message dialog to better inform users, and
- improved error handling in general. Finally, put a funny hack
- into the C version so we could call _PurgeSpace under MPW 2.0.2.
-
- Search for “1.01” in the code to find all the specific changes.
-
-
- Major changes with 1.02
- ________________________
-
- Removed all dependencies on MPW 2.0; this version requires MPW 3.0
- or later. Improved TrapAvailable to handle differences between
- machines prior to the Macintosh II and the Macintosh II and later
- models.
-
- Search for “1.02” in the code to find all the specific changes.
-
-
- Major changes with 1.04
- _______________________
-
- This version requires MPW 3.2, THINK C 5.0, or A/UX 3.0 or later.
- TESample now works with THINK C 5.0.
- This involved separating TESample.c, the original C version, into two
- separate files, one for segment Main, and one for Segment Initialize.
- This was due to the way that THINK C handles its segmentation.
- Also a THINK C project file and resource (.rsrc) file were created.
- Finally, the TESampleGlue.a assembly source was converted to THINK C
- inline assembly in the file TCTESampleGlue.c.
-
- Also see A/UX version notes, below.
-
- _____________________________________________________________________________
-
- TESample is an example application that demonstrates how to
- initialize the commonly used Toolbox managers, operate
- successfully under MultiFinder, handle desk accessories, and
- create, grow, and zoom windows. It demonstrates fundamental
- TextEdit toolbox calls and TextEdit automatic scrolling, and
- it shows how to create and maintain scroll bar controls.
-
- It does not, by any means, demonstrate all the techniques you need
- for a large application. In particular, TESample does not cover
- exception handling, multiple windows or documents, sophisticated
- memory management, printing, or undo, all of which are vital parts
- of a normal full-sized application.
-
- This application is an example of the form of a Macintosh
- application; it is not a template. It is not intended to be used
- as a foundation for the next world-class, best-selling, 600K
- application. A stick figure drawing of the human body may be a
- good example of the form for a painting, but that does not mean it
- should be used as the basis for the next Mona Lisa.
-
- We recommend that you review this program or Sample before
- beginning a new application.
-
-
- A/UX Version Notes
- __________________
-
- The A/UX version was placed into a separate folder as it shares few
- files with the MPW C and THINK C versions. This is largely because
- the A/UX cc compiler will not accept the new style ANSI function
- header style. If you own the A/UX developer's tools with c89, you
- should be able to use the source files for MPW C.
-
- Note that at this time you can not use A/UX to develop native Macintosh
- applications as the A/UX linker creates UNIX format executables which
- are not compatable without A/UX. You may, as this sample demonstrates,
- develop Macintosh toolbox applications that run on a Macintosh with A/UX.